package com.XiaoLongGroup.webtech.entity;/**
 * @author : SLCcccc
 * @date : 2023/4/11 14:15
 */

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.apache.ibatis.type.Alias;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;
import java.util.List;

/**
 *@ClassName User
 *@Description TODO
 *@Author SLCcccc
 *@Date 2023/4/11 14:15
 *@Version 1.0
 */
@Component
@Data
@Alias("User")
@JsonIgnoreProperties({"hibernateLazyInitializer","handler"})
public class User {
    /**
     * 用户编号(UYYYYMMDDXXX)
     */
    private String userId;
    /**
     * 用户姓名
     */
    private String nickName;
    /**
     * 密码
     */
    private String password;
    /**
     * 性别(0-女，1-男)
     */
    private int gender;
    /**
     * 联系方式
     */
    private String phone;
    /**
     * 违规次数
     */
    private String email;

    /**
     * 身份编码
     */
    private String identityId;

    /**
     * 生日
     */
    private Timestamp birthday;

    /**
     * 账户余额
     */
    private Double money;


    /**
     * 文章数
     */
    private Integer articleNum;

    /**
     * 用户文章列表
     */
    private List<Article> articleList;

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", password='" + password + '\'' +
                ", gender=" + gender +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", identityId='" + identityId + '\'' +
                ", birthday=" + birthday +
                ", money=" + money +
                ", articleNum=" + articleNum +
                ", articleList=" + articleList +
                '}';
    }
}
